<template>
	<view class="Securitymanagement">
		<view class="cu-list menu sm-border card-menu margin-top">
	
			<view class="cu-item arrow" v-for="(item,index) in arr" :key="index" @click="policebtn(item.name,item.id)">
				<view class="content">
					<image :src="item.header_img" class="png" mode="aspectFit"></image>
					<text class="text-grey">{{item.name}}</text>
				</view>
			</view>
		</view>
	</view>
	
</template>

<script>
	import {getpolicelist} from "../../api/api/index.js"
	export default {
		data() {
			return {
				arr:[],
				type:""
			};
		},
		methods: {
			policebtn(item,id){
				this.$store.state.text = this.type
				this.$store.state.plicname =item
				this.$store.state.guard_id=id
				uni.navigateBack({
					delta:1
				})
			}
		},
		onLoad(e) {
			this.type=e.type
			getpolicelist().then(res=>{
				this.arr=res.data
			})
		}
	}
</script>

<style scoped lang="scss">
	
	
	.cu-list{
		.cu-item{
			.content{
				display: flex;
				align-items: center;
				.png{
					width: 50rpx ;
					height: 50rpx;
					border-radius: 50rpx;
				}
			}
		}
	}
	
</style>
